import { BaseEntity, Column, Entity, PrimaryGeneratedColumn } from "typeorm";
import { RoomTypeEntity } from "./roomType.entity";

@Entity({ name: 'room' })
export class RoomEntity extends BaseEntity {
    @PrimaryGeneratedColumn()
    id: number;

    @Column({
        type: 'varchar',
        length: 300
    })
    roomNo: string;//房间号

    @Column({
        type: 'int',
    })
    roomTypeId: number;//房型id

    @Column({
        type: 'int'
    })
    roomPrice: number;//房价


    @Column({
        type: 'varchar',
        length: 300
    })
    roomInfo: string;//房间信息

    @Column({
        type: 'tinyint',
        default: 1
    })
    status: 0 | 1;//0：禁用，1: 启用

    roomType: RoomTypeEntity;

}